import { getDictData } from '@/util/dictionary'

export default {
  props: {
    dictType: String
  },
  data() {
    return {
      dictItems: []
    }
  },
  watch: {
    dictType: {
      immediate: true,
      async handler(newVal) {
        if (newVal) {
          this.dictItems = await getDictData(newVal)
        }
      }
    }
  },
}